home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / EasyTools / EASYsound < prev    next >
Text File  |  1996-12-13  |  1KB  |  70 lines

  1. /*
  2.  
  3. $VER: EASYsound 1.0 (15.10.95) by David De Groot
  4.  
  5. This script works with 'dsound' in your c: dir.
  6.  
  7. */
  8.  
  9.  
  10.  
  11. /* NOTE: change 'sound:' in rtfilerequest to whatever dir your samples are stored */
  12.  
  13.  
  14. signal on error
  15. signal on break_c
  16. options failat 21 
  17. NL = '0a'x
  18.  
  19. bool = exists('libs:rexxreqtools.library')
  20. if bool = 0
  21.  then say "You need RexxReqTools.library"
  22. else call addlib('rexxreqtools.library',0,-30)
  23.  
  24. scheck = exists('c:dsound')
  25. if scheck = 0
  26.     then do
  27.      call rtezrequest("DSOUND is not in C:.",, 
  28.                       "Sorry!","ATTENTION!!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  29.     exit 
  30.   end
  31. else
  32.  
  33.  
  34. /* begin */
  35.  
  36. start:
  37. filename = rtfilerequest('sound:',,"Pick a sample to play:", ,,
  38.                          'rtfi_flags = freqf_multiselect rt_reqpos=reqpos_centerscr rtfi_buffer=true', 'zoveel')                  
  39.  
  40. if rtresult == 0 then exit
  41.     
  42. if zoveel == 1 
  43.  then
  44.   do i=1 to zoveel.count
  45.    address command
  46.     'dsound -2 -w ' || filename || ' ' || zoveel.i || ' '
  47.   end
  48.  
  49. else exit
  50.  
  51. signal start 
  52.  
  53.  
  54.  
  55. error:
  56. call rtezrequest("Not a valid 8SVX sound sample file.",,
  57.                  "Snorry!", "Heho!", 'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  58. exit
  59.  
  60.  
  61. break_c:       
  62. call rtezrequest("You entered a break.",, 
  63.                  "Right!","Heho!",'rt_reqpos=reqpos_centerscr')
  64. exit
  65.  
  66.  
  67. /* Futureplans: SELL THE FILMRIGHTS! ;-) */
  68.  
  69.  
  70.